package com.zyinhao.demo.controller;

import com.zyinhao.demo.feign.SchedualServiceHi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by zhangyinhao on 2018/10/17
 * Description：
 */
@RestController
public class HiController {

    @Value("${server.port}")
    private String port;

    @Autowired
    private SchedualServiceHi schedualServiceHi;

    @GetMapping("/hi")
    public String hi(@RequestParam String name){
        return "####" + port + "####  " + schedualServiceHi.sayHiFromClientOne(name);
    }
}
